home *** CD-ROM | disk | FTP | other *** search
- Path: minerva.ibernet.es!usenet
- From: greg_grifolls@redestb.es (Gregori Grifolls)
- Newsgroups: comp.lang.c++
- Subject: Would you like do that ???????????
- Date: Sat, 20 Apr 1996 09:46:08 GMT
- Organization: Servicio IBERNET (Telefonica Transmision de Datos)
- Message-ID: <4lafch$6f9@minerva.ibernet.es>
- NNTP-Posting-Host: 194.224.154.173
- X-Newsreader: Forte Free Agent 1.0.82
-
-
- Hi!!
- I have to implementate a program that calculates the value of a
- arithmrtic parenthesis expression. You can use 'A'..'Z' as a
- openrands, '(',')' as a parenthesis and '+','-','*',/' as a perators.
-
- The program ask you for the charecters of the expression, for exemple
- ((((A+B)*B)/D)-(E*B))/A. it will be stored as a queu(character).
-
- Then the program ask you for the numeric value of the each char.
- During this process the program must check if the char is right, and
- at the end must check if the parenthesis are right( same number of
- parenthesis opened and closed).
-
- Then the expression have to be changed th a postfix and stored in a
- pheap(charecter). exemple ('AB+C*D/EB*-A/').
-
- So that it is necessary use a TAD heap(character) and TAD
- queu(character) in the program, who use too a ask_for_information and
- postfix.
-
- Thx!! for your ideas!!!!!!!!!!!!
-
-